package com.sz.common.pay.common;

import java.io.*;

/**
 * Function: TODO: ADD FUNCTION <br>
 * Author: siqishangshu <br>
 * Date: 2017-11-07 13:34:00
 */
public class InitPrint {

    private static PayLogger payLogger = PayLogger.getLogger(InitPrint.class);

    public static void print() {
        String path = InitPrint.class.getClassLoader().getResource("print.txt").getPath();
        String encoding = "UTF-8";
        File file = new File(path);
        if (file.isFile() && file.exists()) {
            InputStreamReader read = null;
            try {
                read = new InputStreamReader(
                        new FileInputStream(file), encoding
                );
                BufferedReader bufferedReader = new BufferedReader(read);
                String lineTxt = null;
                while ((lineTxt = bufferedReader.readLine()) != null) {
                    payLogger.info(lineTxt);
                }
            } catch (UnsupportedEncodingException e) {
            } catch (FileNotFoundException e) {
            } catch (IOException e) {
            }finally {
                try {
                    read.close();
                } catch (IOException e) {
                }
            }
        }
    }
}
